package com.example.flshtarvel.service;

import com.example.flshtarvel.entity.History;
import com.example.flshtarvel.mapper.HistoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HistoryService {
    @Autowired(required = false)
    HistoryMapper historyMapper;

    public int history(History history){
        return historyMapper.history(history);
    }

    public int deleteHistory(String messageId,String userId){
        return historyMapper.deleteHistory(messageId,userId);
    }

    public List<History> selectHistoryByUserId(String userId){
        return historyMapper.selectHistoryByUserId(userId);
    }
}
